import type { LoginResult } from '@/types/member'
import { http } from '@/utils/http'

// 微信登录
interface loginParams {
  code: string
  iv: string
  encryptedData: string
}

// 微信登录
export const LoginwxMinAPI = (data: loginParams) => {
  return http<LoginResult>({ method: 'POST', url: '/login/wxMin', data })
}

// 模拟登录
export const postLoginWxMinSimpleAPI = (phoneNumber: string) => {
  return http<LoginResult>({
    method: 'POST',
    url: '/login/wxMin/simple',
    data: {
      phoneNumber,
    },
  })
}
